<template>
	<view class="p-20">
		<view v-for="(item,index) in list" :key="index" class="m-b-20  b-f b-r-20 p-30">
			<view class="item f f-a-c f-j-b">
				<view class="left">
					申请时间：{{item.created_at}}
				</view>
				<view class="right" :class="{act:item.status==2,acts:item.status==1,actss:item.status==3}">
					{{item.status==1?'待审核':item.status==2?'审核通过':'审核驳回'}}
				</view>
			</view>
			<view v-if="true" class="lone m-t-20">
				驳回原因：{{item.reason?item.reason:'-'}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				ind: 1,
				page: 1,
				list: [],
				total: 0
			}
		},
		onShow() {
			this.initList()
		},
		onReachBottom() {
			if (this.list.length == this.total) {
				return this.$msg('已经到底了')
			}
			this.page++
			this.initList()
			console.log('123456');
		},
		methods: {
			async initList() {
				let n = await this.$api.Upgrades({
					page: this.page
				})
				this.total = n.data.total
				this.list = [...this.list, ...n.data.data]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.lone {
		font-size: 26rpx;
		font-family: PingFang SC, PingFang SC-Medium;
		font-weight: 500;
		color: #999999;
	}

	.right {
		font-size: 26rpx;
		font-family: PingFang SC, PingFang SC-Regular;
		font-weight: 400;
		text-align: left;
	}

	.act {
		color: #009d85;
	}

	.acts {
		color: #999;
	}

	.actss {
		color: #D62727;
	}

	.left {
		font-size: 26rpx;
		font-family: PingFang SC, PingFang SC-Medium;
		font-weight: 500;
		color: #1a1a1a;
	}
</style>